package com.ds.extend.postProcessor;

import java.util.HashMap;
import java.util.Map;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.MutablePropertySources;

public class ApplicationContextInitializerTest implements ApplicationContextInitializer<ConfigurableApplicationContext> {

	@Override
	public void initialize(ConfigurableApplicationContext applicationContext) {
//		ConfigurableEnvironment environment = applicationContext.getEnvironment();
//		Map<String, String> propertyMap = new HashMap<>();
//        propertyMap.put("com.qxl.name", "qxl2");
//        System.out.println("hggggggg:"+environment.getProperty("com.qxl.name"));
//        EnumerablePropertySourceTest propertySource = new EnumerablePropertySourceTest("myPropertySource", propertyMap);
//        environment.getPropertySources().addLast(propertySource);
		System.out.println("======================ApplicationContextInitializerTest");
	}

}
